<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/WEB-INF/jsp/sys/css.jsp"%>
<%@ include file="/WEB-INF/jsp/sys/uploader.jsp" %>
<%@page import="com.centit.util.RequestUtil" %>

<html lang="zh-cmn-Hans">
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/plugin/css/index.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/ztree/js/jquery.ztree.all.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/plugin/js/selectTree.js"></script>
    <script type="text/javascript"	src="${pageContext.request.contextPath}/modules/airplanebaseinfo/airplanebaseinfo/all/airplanebaseinfo-allinfo.js"></script>
    <style>
        .viewTable th { background: #F5F0F0; font-weight: bold; text-align: center; white-space: nowrap;height: 53px }
        .viewTable th:after { content: "";}
        .viewTable .tTitle{font-weight: bold;text-align: center}
        .viewTable td {height: 50px}
        .editTd{padding: 0px 5px !important;}

    </style>
</head>
<body style="height: 100%;">
<form class="layui-form" id="airplanForm" action="" style="padding: 10px"
      lay-filter="azdbqryForm">
    <div style="text-align: center; margin-bottom: 20px">
        <c:if test="${fn:length(dbNewInfoA)==0}">
            <a  class="layui-btn" id="onImportGcwtHbxx"><i class="layui-icon"></i>上传航班信息</a>
        </c:if>
        <c:if test="${fn:length(dbNewInfoA)>0}">
            <a  class="layui-btn" id="onEditGcwtHbxx">编辑模式</a>
        </c:if>


        <button class="layui-btn layui-btn-primary" onclick="CloseWin()">关闭</button>
    </div>
    <input type="hidden" name="recId" id="recId" value="${recId}">

    <div style="width: 48%;display: inline-block;">
        <table class="viewTable" >

            <tr>
                <th colspan="5">航线维修服务（包含A检及以下定期检修）</th>
            </tr>
            <tr>
                <td class="tTitle">
                    机型
                </td>
                <td class="tTitle">
                    单价
                    （不含税）
                </td>
                <td class="tTitle">
                    飞行小时
                </td>
                <td class="tTitle">
                    合计
                    （不含税）
                </td>
                <td class="tTitle">
                    合计
                    （含13%税）
                </td>
            </tr>
            <c:forEach items="${dbOldInfoA}" var="dbOldInfoA">
                <c:choose>
                    <c:when test="${dbOldInfoA.dataType=='2'}">
                        <tr>
                            <td></td>
                            <td class="tTitle">共计</td>
                            <td>${dbOldInfoA.gjFxxs}</td>
                            <td>${dbOldInfoA.gjBhs}</td>
                            <td>${dbOldInfoA.gjHs}</td>
                        </tr>
                    </c:when>
                    <c:otherwise>
                        <tr>
                            <td>${dbOldInfoA.airPlaneType}</td>
                            <td>${dbOldInfoA.unitPrice}</td>
                            <td>${dbOldInfoA.flightHours}</td>
                            <td>${dbOldInfoA.hjBhs}</td>
                            <td>${dbOldInfoA.hjHs}</td>
                        </tr>
                    </c:otherwise>
                </c:choose>

            </c:forEach>
        </table>
    </div>
    <div style="width: 48%;display: inline-block;">
        <div id="countTableDiv">
            <table class="viewTable" id="countTable" >

                <tr>
                    <th colspan="5" style="background-color: #56c976">航班信息表数据(A检)</th>
                </tr>
                <tr>
                    <td class="tTitle">
                        机型
                    </td>
                    <td class="tTitle">
                        单价
                        （不含税）
                    </td>
                    <td class="tTitle">
                        飞行小时
                    </td>
                    <td class="tTitle">
                        合计
                        （不含税）
                    </td>
                    <td class="tTitle">
                        合计
                        （含13%税）
                    </td>
                </tr>
                <c:if test="${fn:length(dbNewInfoA)==0}">
                    <tr>
                        <td colspan="5" class="tTitle" >
                            请先上传航班信息再进行比对
                        </td>
                    </tr>
                </c:if>
                <c:if test="${fn:length(dbNewInfoA)>0}">
                    <c:forEach items="${dbNewInfoA}" var="dbNewInfoA">
                        <c:choose>
                            <c:when test="${dbNewInfoA.dataType=='2'}">
                                <tr class="viewTr">
                                    <td></td>
                                    <td class="tTitle">共计</td>
                                    <td>${dbNewInfoA.gjFxxs}</td>
                                    <td>${dbNewInfoA.gjBhs}</td>
                                    <td>${dbNewInfoA.gjHs}</td>
                                </tr>
                            </c:when>
                            <c:otherwise>
                                <tr class="viewTr">
                                    <td>${dbNewInfoA.airPlaneType}</td>
                                    <td>${dbNewInfoA.unitPrice}</td>
                                    <td>${dbNewInfoA.flightHours}</td>
                                    <td>${dbNewInfoA.hjBhs}</td>
                                    <td>${dbNewInfoA.hjHs}</td>
                                </tr>
                            </c:otherwise>
                        </c:choose>

                    </c:forEach>
                </c:if>

            </table>
        </div>
        <div id="editTableDiv" style="display: none">
            <table class="viewTable" id="editTable"  >

                <tr>
                    <th colspan="5" style="background-color: #56c976">航班信息表数据(A检)
                        <a  class="layui-btn layui-btn-warm layui-btn-sm" id="onEditSave">保存数据</a>
                        <a  class="layui-btn layui-btn-normal layui-btn-sm" id="onEditRevert">还原数据</a>
                    </th>

                </tr>
                <tr>
                    <td class="tTitle">
                        机型
                    </td>
                    <td class="tTitle">
                        单价
                        （不含税）
                    </td>
                    <td class="tTitle">
                        飞行小时
                    </td>
                    <td class="tTitle">
                        合计
                        （不含税）
                    </td>
                    <td class="tTitle">
                        合计
                        （含13%税）
                    </td>
                </tr>
                <c:if test="${fn:length(dbNewInfoA)==0}">
                    <tr>
                        <td colspan="5" class="tTitle" >
                            请先上传航班信息再进行比对
                        </td>
                    </tr>
                </c:if>
                <c:if test="${fn:length(dbNewInfoA)>0}">
                    <c:forEach items="${dbNewInfoA}" var="dbNewInfoA" varStatus="dbIndex">
                        <c:choose>
                            <c:when test="${dbNewInfoA.dataType=='2'}">
                                <tr id="${dbIndex.count}_gj" class="editTr">
                                    <td><input type="hidden" name="airPlaneType" value="all" /></td>
                                    <td class="tTitle">共计</td>
                                    <td class="editTd"><%--${dbNewInfoA.gjFxxs}--%>
                                        <input type="number" name="gjFxxs" class="layui-input"   value="${dbNewInfoA.gjFxxs}">
                                    </td>
                                    <td class="editTd">
                                        <input type="number" name="gjBhs" class="layui-input"   value="${dbNewInfoA.gjBhs}"></td>
                                    <td class="editTd"><%--${dbNewInfoA.gjHs}--%>
                                        <input type="number" name="gjHs" class="layui-input"   value="${dbNewInfoA.gjHs}"></td>
                                </tr>
                            </c:when>
                            <c:otherwise>
                                <tr id="${dbIndex.count}_jx" class="editTr">
                                    <td style="min-width: 68px">${dbNewInfoA.airPlaneType}
                                        <input type="hidden" name="airPlaneType" value="${dbNewInfoA.airPlaneType}" /></td>
                                    <td class="editTd"><%--${dbNewInfoA.unitPrice}--%>
                                        <input type="number" name="unitPrice" class="layui-input"   value="${dbNewInfoA.unitPrice}"></td>
                                    <td class="editTd"><%--${dbNewInfoA.flightHours}--%>
                                        <input type="number" name="flightHours" class="layui-input"   value="${dbNewInfoA.flightHours}"></td>
                                    <td class="editTd"><%--${dbNewInfoA.hjBhs}--%>
                                        <input type="number" name="hjBhs" class="layui-input"   value="${dbNewInfoA.hjBhs}"></td>
                                    <td class="editTd"><%--${dbNewInfoA.hjHs}--%>
                                        <input type="number" name="hjHs" class="layui-input"   value="${dbNewInfoA.hjHs}"></td>
                                </tr>
                            </c:otherwise>
                        </c:choose>

                    </c:forEach>
                </c:if>

            </table>
        </div>


    </div>

    <div style="width: 48%;display: inline-block;margin-top: 18px">
        <table class="viewTable" >

            <tr>
                <th colspan="5">周转件航材保障服务</th>
            </tr>
            <tr>
                <td class="tTitle">
                    机型
                </td>
                <td class="tTitle">
                    单价
                    （不含税）
                </td>
                <td class="tTitle">
                    飞行小时
                </td>
                <td class="tTitle">
                    合计
                    （不含税）
                </td>
                <td class="tTitle">
                    合计
                    （含13%税）
                </td>
            </tr>
            <c:forEach items="${dbOldInfoZzj}" var="dbOldInfoZzj">
                <c:choose>
                    <c:when test="${dbOldInfoZzj.dataType=='2'}">
                        <tr>
                            <td></td>
                            <td class="tTitle">共计</td>
                            <td>${dbOldInfoZzj.gjFxxs}</td>
                            <td>${dbOldInfoZzj.gjBhs}</td>
                            <td>${dbOldInfoZzj.gjHs}</td>
                        </tr>
                    </c:when>
                    <c:otherwise>
                        <tr>
                            <td>${dbOldInfoZzj.airPlaneType}</td>
                            <td>${dbOldInfoZzj.unitPrice}</td>
                            <td>${dbOldInfoZzj.flightHours}</td>
                            <td>${dbOldInfoZzj.hjBhs}</td>
                            <td>${dbOldInfoZzj.hjHs}</td>
                        </tr>
                    </c:otherwise>
                </c:choose>

            </c:forEach>
        </table>
    </div>
    <div style="width: 48%;display: inline-block;margin-top: 18px">

        <div id="countTableZzjDiv" >
            <table class="viewTable" id="countTableZzj" >

                <tr>
                    <th colspan="5" style="background-color: #56c976">航班信息表数据(周转件)</th>
                </tr>
                <tr>
                    <td class="tTitle">
                        机型
                    </td>
                    <td class="tTitle">
                        单价
                        （不含税）
                    </td>
                    <td class="tTitle">
                        飞行小时
                    </td>
                    <td class="tTitle">
                        合计
                        （不含税）
                    </td>
                    <td class="tTitle">
                        合计
                        （含13%税）
                    </td>
                </tr>
                <c:forEach items="${dbNewInfoZzj}" var="dbNewInfoZzj">
                    <c:choose>
                        <c:when test="${dbNewInfoZzj.dataType=='2'}">
                            <tr class="viewZzjTr">
                                <td></td>
                                <td class="tTitle">共计</td>
                                <td>${dbNewInfoZzj.gjFxxs}</td>
                                <td>${dbNewInfoZzj.gjBhs}</td>
                                <td>${dbNewInfoZzj.gjHs}</td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr class="viewZzjTr">
                                <td>${dbNewInfoZzj.airPlaneType}</td>
                                <td>${dbNewInfoZzj.unitPrice}</td>
                                <td>${dbNewInfoZzj.flightHours}</td>
                                <td>${dbNewInfoZzj.hjBhs}</td>
                                <td>${dbNewInfoZzj.hjHs}</td>
                            </tr>
                        </c:otherwise>
                    </c:choose>

                </c:forEach>
            </table>
        </div>
        <div id="editTableZzjDiv" style="display: none">
            <table class="viewTable"  id="editTableZzj">

                <tr>
                    <th colspan="5" style="background-color: #56c976">航班信息表数据(周转件)
                        <a  class="layui-btn layui-btn-warm layui-btn-sm" id="onEditZzjSave">保存数据</a>
                        <a  class="layui-btn layui-btn-normal layui-btn-sm" id="onEditZzjRevert">还原数据</a>
                    </th>
                </tr>
                <tr>
                    <td class="tTitle">
                        机型
                    </td>
                    <td class="tTitle">
                        单价
                        （不含税）
                    </td>
                    <td class="tTitle">
                        飞行小时
                    </td>
                    <td class="tTitle">
                        合计
                        （不含税）
                    </td>
                    <td class="tTitle">
                        合计
                        （含13%税）
                    </td>
                </tr>
                <c:forEach items="${dbNewInfoZzj}" var="dbNewInfoZzj">
                    <c:choose>
                        <c:when test="${dbNewInfoZzj.dataType=='2'}">
                            <tr class="editZzjTr">
                                <td><input type="hidden" name="airPlaneType" value="all" /></td>
                                <td class="tTitle">共计</td>
                                <td class="editTd"><%--${dbNewInfoZzj.gjFxxs}--%>
                                    <input type="number" name="gjFxxs" class="layui-input"   value="${dbNewInfoZzj.gjFxxs}"></td>
                                <td class="editTd"><%--${dbNewInfoZzj.gjBhs}--%>
                                    <input type="number" name="gjBhs" class="layui-input"   value="${dbNewInfoZzj.gjBhs}"></td>
                                <td class="editTd"><%--${dbNewInfoZzj.gjHs}--%>
                                    <input type="number" name="gjHs" class="layui-input"   value="${dbNewInfoZzj.gjHs}"></td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr class="editZzjTr">
                                <td style="min-width: 68px">${dbNewInfoZzj.airPlaneType}
                                    <input type="hidden" name="airPlaneType" value="${dbNewInfoZzj.airPlaneType}" /></td>
                                <td class="editTd"><%--${dbNewInfoZzj.unitPrice}--%>
                                    <input type="number" name="unitPrice" class="layui-input"   value="${dbNewInfoZzj.unitPrice}"></td>
                                <td class="editTd"><%--${dbNewInfoZzj.flightHours}--%>
                                    <input type="number" name="flightHours" class="layui-input"   value="${dbNewInfoZzj.flightHours}"></td>
                                <td class="editTd"><%--${dbNewInfoZzj.hjBhs}--%>
                                    <input type="number" name="hjBhs" class="layui-input"   value="${dbNewInfoZzj.hjBhs}"></td>
                                <td class="editTd"><%--${dbNewInfoZzj.hjHs}--%>
                                    <input type="number" name="hjHs" class="layui-input"   value="${dbNewInfoZzj.hjHs}"></td>
                            </tr>
                        </c:otherwise>
                    </c:choose>

                </c:forEach>
            </table>
        </div>
    </div>





    <div style="text-align: center; margin-top: 20px">
        <%--<button class="layui-btn" lay-submit="" lay-filter="formSubmit" id="send">发送</button>--%>
        <%--<button class="layui-btn" id="onImportGcwtHbxx">上传航班信息</button>--%>


        <%--<button class="layui-btn layui-btn-primary" onclick="CloseWin()">关闭</button>--%>
    </div>
</form>
<script>
    var basePath= "${pageContext.request.contextPath}";
</script>
<script type="text/javascript" src="${pageContext.request.contextPath}/modules/airplaneinfo_db/ctrl/gcwt_contrast.js"></script>
</body>
</html>
